﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BI.CF.Model;

namespace BI.CF.IDAL
{
    /// <summary>
    /// 用户信息 IDAL
    /// </summary>
    public interface UserIDAL  
    {
        /// <summary>
        /// 用户注册
        /// </summary> 
        /// <param name="u"></param>
        /// <returns></returns>
        bool User_Register(string name, string pwd);

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="name">用户名</param>
        /// <param name="pwd">密码</param>
        /// <returns></returns>
        UserrsModel User_Login(string name, string pwd);
        /// <summary>
        /// 根据借款编号查询借款人具体信息
        /// </summary>
        /// <returns></returns>
       UserrsModel Get_OnlyUsers(int ID);

       /// <summary>
       /// 根据借款编号查询积分信息
       /// </summary>
       /// <param name="ID"></param>
       /// <returns></returns>
       IntegralModel Get_OnlyIntegral(int ID);
        /// <summary>
        /// 用户修改密码
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="UserPwd"></param>
        /// <returns></returns>
       int UserPwdUpd(int UserId,string UserPwd);
        /// <summary>
        /// 用户绑定手机号码
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="Phone"></param>
       int UserBinDingPhone(int UserId,string Phone);
        /// <summary>
        /// 用户绑定邮箱
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="Email"></param>
        /// <returns></returns>
       int UserBinDingEmail(int UserId,string Email);
       
        
        /// <summary>
        /// 注册用户是否重复
        /// </summary>
        /// <param name="name">用户名</param>
        /// <returns></returns>
        int User_RegisterRepeat(string name);
        /// <summary>
        /// 用户绑定银行卡
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="BankCard"></param>
        /// <returns></returns>
        int UserBinDingBankCard(int UserId, string BankCard);

        /// <summary>
        /// 修改用户支付密码
        /// </summary>
        /// <returns></returns>
        int UserPayPwd_Upd(UserrsModel m);

        /// <summary>
        /// 修改用户密码前，密码
        /// </summary>
        /// <param name="pwd"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        int PwdQuery(int pwd, int id);
    }
}